gold.lang.require('gold.framework.Assert');

gold.TestRunner.add('Assert Test', {
	testIsTrueDoesNotThrowOnTrue: function() {
		gold.assert(true).isTrue();
	},
	testIsTrueDoesThrowOnFalse: function() {
		gold.assert(gold.assert(false).isTrue).doesThrow('Assertion failed: Expected true but was false');
	},
	testDoesThrowThrowsWhenFunctionDoesNotThrow: function() {
		gold.assert(gold.assert(function(){}).doesThrow).doesThrow('Assertion failed: The function did not throw an exception.');
	},
	testDoesThrowDoesNotThrowWhenFunctionThrows: function() {
		gold.assert(function(){ throw new Error('ohai'); }).doesThrow('ohai');
	}
});